package net.xdclass.service;

import net.xdclass.model.ProductDO;
import com.baomidou.mybatisplus.extension.service.IService;
import net.xdclass.model.ProductMessage;
import net.xdclass.request.LockProductRequest;
import net.xdclass.until.JsonData;
import net.xdclass.vo.ProductVO;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 二当家小D
 * @since 2022-02-18
 */
public interface ProductService extends IService<ProductDO> {

    Map<String, Object> pageProductList(int page, int size);

    ProductVO findDetailById(long product_id);

    List<ProductVO> findProductsByIdBatch(List<Long> productIds);

    JsonData lockProductStock(LockProductRequest lockProductRequest);

    boolean releaseProductStock(ProductMessage productMessage);
}
